package gui;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;

import data.model.Project;
import data.model.ProjectCharacteristics;
import data.model.ProjectsCollection;

public class OverviewComposite extends Composite {
	private final ProjectsCollection projects;

	/**
	 * Create the composite.
	 * 
	 * @param parent
	 * @param style
	 */
	public OverviewComposite(Composite parent, int style,
			ProjectsCollection projects,
			ProjectCharacteristics projectHealthCriteria) {
		super(parent, SWT.NONE);
		setLayout(new GridLayout(1, false));
		this.projects = projects;

		for (Project project : projects.values()) {
			Composite projectOverviewComposite = new ProjectOverviewComposite(
					this, SWT.NONE, project, projectHealthCriteria);
			projectOverviewComposite.setLayoutData(new GridData(SWT.LEFT,
					SWT.TOP, true, true, 1, 1));
		}
	}
}
